<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title>根据变量的值，输出照片</title>
    </head>
    <body>
        <?php
        // put your code here
//        $x='女';
//        if ($x=='男')
//        {
//            echo  '<img src="images/nn.jpg" width="500" height="594" alt="nn"/>';
//        }
//        if ($x=='女')
//        {
//            echo '<img src="images/nv.jpg" width="700" height="700" alt="nv"/>' ;
//        }
        
        //输出笑脸
        $f=97;
        $fs=(int)($f/10);
        $x='<img src="images/haha.gif" width="100" height="100" alt="haha"/>';
        $y='<img src="images/cry.jpg" width="100" height="100"/>';
        switch ($fs) {
            case 10:
               echo "{$x}{$x}{$x}{$x}{$x}";
               break;
            case 9:
               echo "{$x}{$x}{$x}{$x}";
               break;
           case 8:
               echo "{$x}{$x}{$x}";
               break;
           case 7:
               echo "{$x}{$x}";
                break;
           case 6:
               echo "{$x}";               
               break;
            default:
                echo "$y";
                break;
        }
        ?>
        

        


    </body>
</html>
